package cn.edu.gzist.chapter08.service;

import org.springframework.amqp.rabbit.annotation.Exchange;
import org.springframework.amqp.rabbit.annotation.Queue;
import org.springframework.amqp.rabbit.annotation.QueueBinding;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Service;

@Service
public class DirectService {
    @RabbitListener(bindings = @QueueBinding(value = @Queue("zhujie.direct"),
            exchange = @Exchange(value="zhujie.direct",type = "direct")))
    public void handler1(String msg){
        System.out.println("DirectService====="+msg);
    }
}
